#ifndef VPFRAMEQUEUE_H
#define VPFRAMEQUEUE_H
#include <vpframe.h>
#include <QList>
#include <condition_variable>
class VpFrameQueue
{
private:
    int                m_serial;
    int                m_stream_idx;
    bool               m_stop;
    QList<VpFrame>     m_list;

public:
    AVRational         m_tb;
    condition_variable m_cond;
    mutex              m_mutex;

public:
            VpFrameQueue  ();
            ~VpFrameQueue ();
    void    push          (VpFrame &elem);
    VpFrame pop           ();
    void    flush_queue   ();
    void    setSerial     (int newSerial);
    int     get_size      ();
    int     serial        () const;
    int     stream_idx    () const;
    void    setStream_idx (int newStream_idx);
    void    stop          ();
    void    start         ();
};

#endif // VPFRAMEQUEUE_H
